.historic
  %ul
    - for version in resource.versions
      %li
        - if version.create?
          %p= :created_at_by.th(at: version.created_at.l, by: (version.creator_name || :unknown_user.tl))
        - elsif version.update?
          %p= :updated_at_by.th(at: version.created_at.l, by: (version.creator_name || :unknown_user.tl))
          %ul.changes
            - for change in version.changes
              - unless change.old_value.blank? and change.new_value.blank?
                %li
                  %p
                    - if change.old_value.blank?
                      = :x_has_been_updated_to_a.th(x: change.human_attribute_name, a: change.human_new_value)
                    - elsif change.new_value.blank?
                      = :x_has_been_cleared.th(x: change.human_attribute_name, a: change.human_old_value)
                    - else
                      = :x_has_been_updated_from_a_to_b.th(x: change.human_attribute_name, a: change.human_old_value, b: change.human_new_value)

        - elsif version.destroy?
          %p= :destroyed_at_by.th(at: version.created_at.l, by: (version.creator_name || :unknown_user.tl))


